package com.pentofab.payrollmanagement.dao.model;

import java.util.ArrayList;
import java.util.HashMap;

import com.pentofab.payrollmanagement.utilities.CustomTableConstants;


public class AttendanceLeaveDetail {

	private String eid; 
	private String empName; 
    private String company;
	private String deptCol;
	private String attDate; 
	private String from_time; 
	private String to_time; 
	private String total; 
	private String reson;
	private boolean firstLogin;
	private boolean lastLogOut;
	private int rownum;
	
	public AttendanceLeaveDetail(){
		super();
	}
	public AttendanceLeaveDetail(HashMap<String, String> attLevList){
		eid = attLevList.get(CustomTableConstants.EMPI);
		empName = attLevList.get(CustomTableConstants.name);
		company = attLevList.get(CustomTableConstants.company);
		deptCol = attLevList.get(CustomTableConstants.department);
		attDate = attLevList.get(CustomTableConstants.attDate);
		from_time = attLevList.get(CustomTableConstants.from_time);
		to_time = attLevList.get(CustomTableConstants.to_time);
		total = attLevList.get(CustomTableConstants.total);
		reson = attLevList.get(CustomTableConstants.reason);
		firstLogin = Boolean.parseBoolean(attLevList.get(CustomTableConstants.firstLogin));
		lastLogOut = Boolean.parseBoolean(attLevList.get(CustomTableConstants.lastLogOut));
		rownum = Integer.parseInt(attLevList.get(CustomTableConstants.rowNum));
		
	}
	
	public static ArrayList<AttendanceLeaveDetail> getAttendanceLeaveDetailList(ArrayList<HashMap<String, String>> attLevList){
		ArrayList<AttendanceLeaveDetail> detaillist = new ArrayList<AttendanceLeaveDetail>();
		if(attLevList == null){
			return detaillist;
		}
		for (int i = 0; i < attLevList.size(); i++) {
			detaillist.add(new AttendanceLeaveDetail(attLevList.get(i)));
		}
		return detaillist;
	}
	
	public String getEid() {
		return eid;
	}
	public void setEid(String eid) {
		this.eid = eid;
	}
	public String getEmpName() {
		return empName;
	}
	public void setEmpName(String empName) {
		this.empName = empName;
	}
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getDeptCol() {
		return deptCol;
	}
	public void setDeptCol(String deptCol) {
		this.deptCol = deptCol;
	}
	public String getAttDate() {
		return attDate;
	}
	public void setAttDate(String attDate) {
		this.attDate = attDate;
	}
	public String getFrom_time() {
		return from_time;
	}
	public void setFrom_time(String from_time) {
		this.from_time = from_time;
	}
	public String getTo_time() {
		return to_time;
	}
	public void setTo_time(String to_time) {
		this.to_time = to_time;
	}
	public String getTotal() {
		return total;
	}
	public void setTotal(String total) {
		this.total = total;
	}
	public String getReson() {
		return reson;
	}
	public void setReson(String reson) {
		this.reson = reson;
	}
	public boolean getFirstLogin() {
		return firstLogin;
	}
	public void setFirstLogin(boolean firstLogin) {
		this.firstLogin = firstLogin;
	}
	public boolean getLastLogOut() {
		return lastLogOut;
	}
	public void setLastLogOut(boolean lastLogOut) {
		this.lastLogOut = lastLogOut;
	}

	public int getRownum() {
		return rownum;
	}

	public void setRownum(int rownum) {
		this.rownum = rownum;
	}
}
